package edu.brandeis.cs.steele.util;

import java.io.File;
import java.util.List;

import edu.brandeis.cs.steele.wn.DictionaryDatabase;
import edu.brandeis.cs.steele.wn.FileBackedDictionary;
import edu.brandeis.cs.steele.wn.POS;

public class GetAllWords {

    public static List<String> getAllWords(POS pos) {
	File f = new File(".//db");
	if (f.exists())
	    System.out.println(".//db//index.noun");
	DictionaryDatabase dictionary = new FileBackedDictionary(".//db");
	List<String> words = dictionary.getAllWords(pos);
	return words;
    }

    public static void main(String[] args) {
	List<String> words = getAllWords(POS.NOUN);
	int i=0;
	for (String string : words) {
	if(++i == 1000) break;
	System.out.println(string);

	}	
    }
}
